const xhr = new XMLHttpRequest();
xhr.open('get','https://api.iynn.cn/mock?t=2');

xhr.onload=function(){
    const res = JSON.parse(xhr.responseText);
    // return res;
    console.log(res);
}
xhr.send();







const oBody = document.querySelector('tbody');
const oMask = document.querySelector('#mask');
const oSpan = document.querySelector('.oX');
// const oTitle = document.querySelector('[name="title"]');
let n = 0;
const oYes = document.querySelector('._yes');
const oNo = document.querySelector('._no');

const adTit = document.getElementsByName('title');
const adUSer = document.getElementsByName('user');
const adDate = document.getElementsByName('date');

const oTit = document.querySelector('.t_title');
const oUser = document.querySelector('.t_user');
const oDate = document.querySelector('.t_date');
const oNew = document.querySelector('xin');
oSpan.onclick = function(){
    oMask.style.display = 'none';
}
oBody.innerHTML = `
    <tr>
        <td class="t_id">${++n}</td>
        <td class="t_title">${'在移动设备开发'}</td>
        <td class="t_user">${'张若昀'}</td>
        <td class="t_date">${'2022-02-09'}</td>
        <td class="t_use">
            <span class='delete'>删除</span>
            <span class='edit'>编辑</span>
        </td>
    </tr>
    <tr>
        <td class="t_id">${++n}</td>
        <td class="t_title">${'图形及特效特性'}</td>
        <td class="t_user">${'张若昀'}</td>
        <td class="t_date">${'2022-02-09'}</td>
        <td class="t_use">
            <span class='delete'>删除</span>
            <span class='edit'>编辑</span>
        </td>
    </tr>
    <tr>
        <td class="t_id">${++n}</td>
        <td class="t_title">${'设备兼容特性'}</td>
        <td class="t_user">${'张若昀'}</td>
        <td class="t_date">${'2022-02-09'}</td>
        <td class="t_use">
            <span class='delete'>删除</span>
            <span class='edit'>编辑</span>
        </td>
    </tr>
    <tr>
        <td class="t_id">${++n}</td>
        <td class="t_title">${'W3C将致力于开发用于实时通信'}</td>
        <td class="t_user">${'张若昀'}</td>
        <td class="t_date">${'2022-02-09'}</td>
        <td class="t_use">
            <span class='delete'>删除</span>
            <span class='edit'>编辑</span>
        </td>
    </tr>
    <tr>
        <td class="t_id">${++n}</td>
        <td class="t_title">${'全新的表单输入对象'}</td>
        <td class="t_user">${'张若昀'}</td>
        <td class="t_date">${'2022-02-09'}</td>
        <td class="t_use">
            <span class='delete'>删除</span>
            <span class='edit'>编辑</span>
        </td>
    </tr>
`
oNo.onclick = function(){
    oMask.style.display = 'none';
}
oYes.onclick = function(){
    oTit.innerHTML = adTit.values;
    oUser.innerHTML = adUSer.values;
    oDate.innerHTML = adDate.values;
}
oNew.onclick = function(){
    oMask.style.display = 'block';
}